1. Field of the Invention
The present invention generally relates to data processing and more particularly to user interfaces for accessing data.
2. Description of the Related Art
Databases are computerized information storage and retrieval systems. The most prevalent type of database is the relational database, a tabular database in which data is defined so that it can be reorganized and accessed in a number of different ways.
Regardless of the particular architecture, a requesting entity (e.g., an application or the operating system) demands access to a specified database by issuing a database access request, or query. Such queries may include, for instance, simple catalog lookup requests or transactions and combinations of transactions that operate to read, change and add specified records in the database. The term “query” denominates a set of commands for retrieving data from a stored database. Queries take the form of a command language that lets programmers and programs select, insert, update, find out the location of data, and so forth. One well-known high-level query language is the Structured Query Language (SQL). Illustratively, SQL is used to make interactive queries for getting information from and updating a database such as International Business Machines' (IBM) DB2, Microsoft's SQL Server, and database products from Oracle, Sybase, and Computer Associates.
One problem with accessing a database using a query language is that the interface for specifying a search query is commonly a text interface for which users require a degree of proficiency with the query language. Users often create syntactically incorrect queries, or if correct, queries which return undesired (i.e., incorrect or useless) results.
In order to facilitate query searches, some systems provide graphical user interfaces (GUIs). A GUI eliminates the need to understand the details of the underlying datastore and simplifies the process of creating a search expression, thereby reducing the necessary training. A typical GUI may allow a user to define a search query over a series of screens. Search criteria may be independently selected to allow for dynamic building of queries. For example, one GUI may allow a user to find customers according to various independently selectable demographics. Such demographics may include, for example, a state and an age range, each of which are presented in the GUI with an associated check box. Accordingly, by checking the appropriate check boxes and specifying desired values for each of the selected demographics, a customer may build a query based on a state, and age range, or both. One such GUI 100 comprising a State search criterion 102 and an Age Range search criterion 104 is shown in FIG. 1. Illustratively, the query constructed in the GUI 100 will find customers who live in the state of Minnesota and are between the ages of 30 and 40.
One limitation with existing GUIs for building queries is the inability to build event-based queries. Event-based queries are queries or searches that associate a search criterion/criteria (a portion of the overall search) with an event defined by another search criterion/criteria. An example of an event-based query would be a query to find customers who live/lived in the state of Minnesota and at the time they lived in the state of Minnesota were between the ages of 30 and 40. In this case, the “event” is living in the specified state (in this case Minnesota). Simply changing the definition of the Age Range search criterion 104 to mean age at the time the person lived in the specified state is not desirable since it limits the ability of a user to generate a query for finding people currently living in Minnesota and between the age of 30 and 40. Both queries may be valuable for different reasons and, accordingly, a user must be given the flexibility to specify either query.
Therefore, there is a need for a graphical user interface through which event-based queries can be defined.